<!DOCTYPE HTML>
<html lang="en-US">
<head>

	<title>搜藏</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta charset="UTF-8">
	<script type="text/javascript" src="https://lib.baomitu.com/vue/2.6.12/vue.min.js"></script>
	<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.min.js"></script>

	<link rel="stylesheet" type="text/css" href="styles.css">

	<script type="text/javascript">
		function add(){
			window.open ('fav.do?op=toAdd', 'newwindow',
					'height=300, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
		}
	</script>
</head>
<body>
<form name="favForm" method="post" action="/cang/fav.do;jsessionid=FF8C0487A99814B144B07E5633524A0F">
	<input type="hidden" name="op" value="toList" />

	<div class="banner" valign="top">
		搜藏
	</div>

	<table id="app" cellspacing="0" cellpadding="0" border="0">
		<tr>
			<td style="text-align:right;" valign="top">
				<!-- 左边Tag列表 -->
				<div class="left_labels" >


					<table class="labels_table" cellspacing="0" cellpadding="0" border="0">
						<tr><td><a href="#" onclick="add();" style="font-weight:bold;">添加书签</a></td></tr>
						<tr>
							<td class="selected_label">
								<a href="fav.do?op=toList&type=-1">全部</a>
							</td>
						</tr>
						<tr>
							<td >
								<a href="fav.do?op=toList&type=0">未分类</a>
							</td>
						</tr>

						<tr v-for=" t in tags">
							<td><a href="#" @click.prevent="showFavorite(t)">{{t.tname}}</a></td>
						</tr>

						<tr>
							<td>
								<a style="font-weight:bold;" href="fav.do?op=toCloud">云图</a>
							</td>
						</tr>
					</table>
				</div>
			</td>
			<td>
				<!-- 右边fav内容 -->
				<div class="content_links">

					<div v-for="f in favorites" style="padding:6px 10px;">
						<div>
							<a :href="'http://'+f.furl" style="color:blue;font-size:18px;" target="_blank">{{f.flabel}}</a>
						</div>
						<div style="color:black;font-size:16px;">
							{{f.fdesc}}
						</div>
						<div style="color:green;font-size:14px;">
							http://{{f.furl}}
						</div>
					</div>

				</div>
			</td>
		</tr>
	</table>

	<script>
		var v = new Vue({
			el : "#app",
			data : { tags : [], favorites : []},
			created(){
				axios.get("allTag.s").then(res=>{
					this.tags = res.data;
				});
			},
			methods:{
				showFavorite(tag){
					this.favorites = tag.flist;
				}
			}
		})
	</script>

</form>
</body>
</html>